﻿using Furion.DatabaseAccessor;
using FurStudy.Core;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurStudy.EntityFramework.Core
{
    /// <summary>
    /// 主数据库上下文
    /// 随机或自定义返回从库
    /// 获取随机仓储或自定义仓储
    /// 配置主库[AppDbContext]特性的SlaveDbContextLocators属性，可通过构造函数最后参数传入
    /// </summary>
    [AppDbContext("Sqlite3ConnectionString", DbProvider.Sqlite, typeof(SlaveDbContextLocator), typeof(SlaveDbContextLocator2), typeof(SlaveDbContextLocator3))]
    public class MasterDbContext : AppDbContext<MasterDbContext>
    {
        public MasterDbContext(DbContextOptions<MasterDbContext> options) : base(options)
        {
        }
    }
}
